## this file for Simulating the "Call Trace" action. SUPPORT for DEMO SCENARION 3 :Using EDA + webhook to notice administrator for unhealthy Linux status detecting


#!/bin/bash

tail -f /var/log/messages | while read line; do
    if [[ "$line" == *"Call Trace"* ]]; then
        curl -H 'Content-Type: application/json' \
            -d "{\"message\": \"Call Trace\"}" \
            http://10.71.18.47:5000/endpoint
    fi
done


## DEMO Step for CMD exec ##
# cd /root
# ./monitor-log.sh &
# logger "Call Trace: 1212121212“
# ps -ef | grep monitor-log
# kill 9 【PID】
